package com.example.combwx.mvp.view;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;

import androidx.appcompat.app.AppCompatActivity;

import com.example.combwx.R;
import com.flyco.tablayout.SlidingTabLayout;

public class ChangeNameAvtivity extends AppCompatActivity {

    private ImageView nicknameBack;
    private EditText editNickname;
    private Button nicknameSave;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_change_name_avtivity);
        initView();


        nicknameSave.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                String s = editNickname.getText().toString().trim();
                Intent intent = new Intent();
                intent.setAction("xxx");
                intent.putExtra("a",s);
                sendBroadcast(intent);
                finish();
            }
        });
    }

    private void initView() {
        nicknameBack = (ImageView) findViewById(R.id.nickname_back);
        editNickname = (EditText) findViewById(R.id.edit_nickname);
        nicknameSave = (Button) findViewById(R.id.nickname_save);
    }
}
